package com.xwt.pattern.iterator;

import com.xwt.pattern.utils.Utils;

/**
 * Author:  Steven Xiao
 * Description:老板来看项目信息了
 * Date:  2016/3/23
 * Time:  15:53
 */
public class Boss {

    public static void main(String[] args) {
        //定义一个list，存放所有的项目对象
        IProject project = new Project();

        project.add("星球大战项目", 10, 100000);
        project.add("扭转时空项目", 100, 10000000);
        project.add("超人改造项目", 1000, 1000000000);

        for (int i = 4; i < 104; i++) {
            project.add("第" + i + "个项目", i * 5, i * 10000);
        }

        //遍历一下ArrayList,把所有数据都取出
        IProjectIterator projectIterator =project.iterator();
        while (projectIterator.hasNext()){
            IProject p = (IProject) projectIterator.next();
            Utils.println(p.getProjectInfo());
        }
    }


}
